/*
 * @Author: jhw jiaxianshengye@gmail.com
 * @LastEditTime: 2025-08-01 13:51:24
 * @LastEditors: jhw
 * @Description: 文件描述
 */
import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'

export const routes = [
  {
    path: '/testWidcss',
    name: 'testWidcss',
    meta: {
      name: '测试Widcss',
    },
    component: () => import('@/views/testWidcss.vue'),
  },
  {
    path: '/test2Widcss',
    name: 'test2Widcss',
    meta: {
      name: '测试Widcss2',
    },
    component: () => import('@/views/test2Widcss.vue'),
  },
  {
    path: '/exportExcel',
    name: 'exportExcel',
    meta: {
      name: '导出Excel测试相应速度',
    },
    component: () => import('@/views/exportExcel.vue'),
  },
  {
    path: '/echartsTest',
    name: 'echartsTest',
    meta: {
      name: 'Echarts测试懒加载',
    },
    component: () => import('@/views/echartsTest/index.vue'),
  },
  {
    path: '/echartsTest1',
    name: 'echartsTest1',
    meta: {
      name: 'Echarts测试-无懒加载1',
    },
    component: () => import('@/views/echartsTest/index1.vue'),
  },
  {
    path: '/vuedesign',
    name: 'vuedesign',
    meta: {
      name: 'Vue电子签名测试',
    },
    component: () => import('@/views/vueDesign/index.vue'),
  },
  {
    path: '/pdftest1',
    name: 'pdftest1',
    meta: {
      name: 'iframe方式测试pdf预览',
    },
    component: () => import('@/views/pdfTest/index.vue'),
  },
  {
    path: '/pdftestTwo',
    name: 'pdftestTwo',
    meta: {
      name: 'pdfh5 方式pdf预览',
    },
    component: () => import('@/views/pdfTest/pdftestTwo.vue'),
  },
  {
    path: '/pdftest3',
    name: 'pdftest3',
    meta: {
      name: 'pdfdist 方式',
    },
    component: () => import('@/views/pdfTest/pdftest3.vue'),
  },
  {
    path: '/webWorker1',
    name: 'webWorker1',
    meta: {
      name: 'webWorker1',
    },
    component: () => import('@/views/webWorker/webWorker1.vue'),
  },
] as RouteRecordRaw[]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/testWidcss',
    },
    ...routes, // 使用上面定义的路由数组
  ],
})

export default router
